class TFRingFX extends xEmitter;

var int grade;
var tfStation station;
var staticmesh NodeMeshes[4];

replication
{
    reliable if ( Role == ROLE_Authority )
		station, grade;
}

simulated function postbeginplay()
{
    settimer(0.2,true);
    super.PostBeginPlay();
}

simulated function timer()
{
    if(station.MyTeam==0)
    {
        mColorRange[0].B=50;
        mColorRange[0].G=100;
        mColorRange[0].R=255;
        mColorRange[1].B=50;
        mColorRange[1].G=100;
        mColorRange[1].R=255;
    }
    else if(station.MyTeam==1)
    {
        mColorRange[0].B=255;
        mColorRange[0].G=100;
        mColorRange[0].R=50;
        mColorRange[1].B=255;
        mColorRange[1].G=100;
        mColorRange[1].R=50;
    }
    else
    {
        mColorRange[0]=default.mColorRange[0];
        mColorRange[1]=default.mColorRange[1];
    }

    if(grade==Station.grade) return;

    grade=station.grade;
    mMeshNodes[0]=NodeMeshes[grade];

    mMassRange[0]=default.mMassRange[0]*grade;
    mMassRange[1]=default.mMassRange[1]*grade;
    mColorRange[0].A=32*grade+163;
    mColorRange[1].A=32*grade+163;
    mRegenRange[0]=3*grade;
    mRegenRange[1]=3*grade;
}

defaultproperties
{
     NodeMeshes(1)=StaticMesh'TFMedia.Buildings.tfLevelRing1'
     NodeMeshes(2)=StaticMesh'TFMedia.Buildings.tfLevelRing2'
     NodeMeshes(3)=StaticMesh'TFMedia.Buildings.tfLevelRing3'
     mParticleType=PT_Mesh
     mStartParticles=0
     mMaxParticles=20
     mLifeRange(0)=1.000000
     mLifeRange(1)=1.000000
     mRegenRange(0)=0.000000
     mRegenRange(1)=0.000000
     bSuspendWhenNotVisible=False
     mSpeedRange(0)=0.000000
     mSpeedRange(1)=0.000000
     mPosRelative=True
     mMassRange(0)=-0.130000
     mMassRange(1)=0.130000
     mAirResistance=0.000000
     mSizeRange(0)=1.000000
     mSizeRange(1)=1.300000
     mGrowthRate=-0.300000
     mColorRange(0)=(B=150)
     mColorRange(1)=(B=150)
     mAttenKa=0.500000
     mAttenKb=0.000000
     mAttenFunc=ATF_Pulse
     bTrailerSameRotation=True
     bReplicateMovement=False
     Physics=PHYS_Trailer
     RemoteRole=ROLE_SimulatedProxy
     Skins(0)=FinalBlend'TFMedia.GenFX.tfLevRing1'
     Style=STY_Additive
}
